package com.water.controller;

import com.water.entity.WaterUsage;
import com.water.result.Result;
import com.water.service.WaterUsageService;
import com.water.vo.WaterUsageVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @program: city_water
 * @description:
 * @author: lydms
 * @create: 2024-05-11 20:45
 **/

@RestController
@RequestMapping("/user/waterUsage")
@Slf4j
@Api(tags = "水表使用量")

public class WaterUsageController {

    @Autowired
    private WaterUsageService waterUsageService;

    @GetMapping("/getInfo")
    @ApiOperation("查询水表使用量")
    public Result<WaterUsageVo>getInfo() {
        WaterUsageVo waterUsageVo = waterUsageService.getInfo();
        return Result.success(waterUsageVo);
    }


}
